﻿/*************************************************************************
 * Created by OhZee Creative, LLC
 * 2013
 * This code is licensed under Microsoft Public License (Ms-PL)
 * http://opensource.org/licenses/ms-pl
 * http://ozframework.codeplex.com/
 *************************************************************************/

namespace OhZeeCreative.WindowsPhone
{
    using System;
    using Microsoft.Phone.Tasks;

	public class Marketplace
	{
		public static void Share(string appName, string message, Uri deepLink)
		{
			ShareLinkTask linkTask = new ShareLinkTask();
			linkTask.Title = appName;
			linkTask.Message = message;
			linkTask.LinkUri = deepLink;
			linkTask.Show();
		}

		public static void Rate()
		{
			MarketplaceReviewTask task = new MarketplaceReviewTask();
			task.Show();
		}

		public static void ContactUs(string subject)
		{
			ContactUs("info@ohzeecreative.com", subject);
		}

		public static void ContactUs(string toEmail, string subject)
		{
			EmailComposeTask task = new EmailComposeTask();
			task.To = toEmail;
			task.Subject = subject;
			task.Show();
		}

		public static void ShowOtherAppsListing()
		{
			MarketplaceSearchTask marketSearch = new MarketplaceSearchTask();
			marketSearch.ContentType = MarketplaceContentType.Applications;
			marketSearch.SearchTerms = "OhZee";
			marketSearch.Show();
		}
	}
}
